<?php

//$table目标表格名称
//$ai_date,获取过来的数据
//$target 目标项名称
//$target_value 目标项的值
function sql_log($sql)
{
	global $table_Prefix;
	
	$username = $_SESSION['username'];
	
	$ip   = $_SERVER["REMOTE_ADDR"];
    $url  = get_url();
    $os   = get_os();
    $browser  = get_browsers();
    $language = get_language();
  
    $screen = $_COOKIE['screen'];
	
	mysql_query("INSERT INTO ".$table_Prefix."sql_log (sql_data,url,os,browser,resolution,authur,ip,language) value ('".addslashes($sql)."','".$url."','".$os."','".$browser."','".$screen."','".$username."','".$ip."','".$language."') ");

}